package com.dhn.service.Impl;
import com.dhn.entity.Patient;
import com.dhn.mapper.PatientMapper;
import com.dhn.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PatientServiceImpl implements PatientService {
@Autowired
private PatientMapper patientMapper;
    @Override
    public List<Patient> getPatients(Patient patient) {
        return patientMapper.getPatients(patient);
    }

    @Override
    public int getTotal(Patient patient) {
        return patientMapper.getTotal(patient);
    }


    @Override
    public int delPatientById(int id) {
        return patientMapper.delPatientById(id);
    }

    @Override
    public int addPatient(Patient patient) {
        return patientMapper.addPatient(patient);
    }

    @Override
    public int updatePatient(Patient patient) {
        return patientMapper.updatePatient(patient);
    }

    @Override
    public Patient getUpdateById(int id) {
        return patientMapper.getUpdateById(id);
    }

}
